package com.hsp.homework.homework5;

public class Teacher extends Employee{
    private int classDay;//一年上课次数
    private double classSal;//课时费

    public Teacher(String name, double sal) {
        super(name, sal);
    }

    public int getClassDay() {
        return classDay;
    }

    public void setClassDay(int classDay) {
        this.classDay = classDay;
    }

    public double getClassSal() {
        return classSal;
    }

    public void setClassSal(double classSal) {
        this.classSal = classSal;
    }

    @Override
    public void printSal() {
        System.out.print("老师");
        System.out.println(getName()+" 年工资："+
                (getSal()*getSalMonth()+getClassSal()*getClassDay()));
    }
}
